package datatypes.film;

import java.util.ArrayList;
import java.util.List;

public class filmRoles {
	List<filmRole> film_roles;

	public filmRoles() {
		this.film_roles = new ArrayList<filmRole>();
	}

	public filmRoles(filmRole film_actor) {
		this.film_roles = new ArrayList<filmRole>();
		this.film_roles.add(film_actor);
	}

	public filmRoles(List<filmRole> film_role) {
		this.film_roles = new ArrayList<filmRole>();
		this.film_roles.addAll(film_role);
	}

	public void addFilmRole(filmRole film_role) {
		this.film_roles.add(film_role);
	}
	
	public List<filmRole> getfilmRoles(){
		return this.film_roles;
	}
	
	public String toString() {
		StringBuilder sb = new StringBuilder();
		int filmRoleIndex = 1;
		for (filmRole film_role : film_roles) {
			sb.append("film role <" + filmRoleIndex++ + ">: \n");
			sb.append(film_role.toString() + "\n");
		}

		return sb.toString();
	}
}
